<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Auth::routes();

Route::get('/', function () {
    return view('welcome');
});

#上传文件到OSS
Route::post('common/uploadFileObs',"CommonController@uploadFileObs")->name('common.uploadFileObs');//

#聊天
Route::get('chat',"ChatController@index")->name('chat.index');//加载单聊模板
Route::get('chat/groupIndex',"ChatController@groupIndex")->name('chat.groupIndex');//加载群聊模板


Route::post('chat/binding',"ChatController@binding")->name('chat.binding');//用户id与workmain的id进行绑定
Route::post('chat/sendMassage',"ChatController@sendMassage")->name('chat.sendMassage');//用户发送消息

Route::post('chat/joinGroup',"ChatController@joinGroup")->name('chat.joinGroup');//加入群组
Route::post('chat/sendToGroupMassage',"ChatController@sendToGroupMassage")->name('chat.sendToGroupMassage');//发送群组消息

Route::post('chat/getGroupMsgList',"ChatController@getGroupMsgList")->name('chat.getGroupMsgList');//获取群组聊天记录列表

Route::post('chat/delUnreadNum',"ChatController@delUnreadNum")->name('chat.delUnreadNum');//清空指定用户在指定群组中的未读消息数量


//好友相关
Route::get('user/list',"UserController@list")->name('user.list')->middleware('im_binding');//加载用户/群组列表模板

Route::get('user/getUser',"UserController@getUser")->name('user.getUser');//ajax获取用户信息

Route::get('user/addchatGroupForm',"UserController@addchatGroupForm")->name('user.addchatGroupForm');//加载创建群组页面

Route::post('user/addchatGroup',"UserController@addchatGroup")->name('user.addchatGroup');//创建群组页面

Route::get('user/getChatRecordsList','UserController@getChatRecordsList')->name('user.getChatRecordsList');//获取聊天记录分组列表

Route::get('user/getChatRecordsShow','UserController@getChatRecordsShow')->name('user.getChatRecordsShow');//获取聊天记录列表
